home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10484 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 62 6c | 61 63 6b 2e 77 65 65 67 |Path: bl|ack.weeg|
|00000010| 2e 75 69 6f 77 61 2e 65 | 64 75 21 72 6f 62 69 6e |.uiowa.e|du!robin|
|00000020| 73 6f 6e 0a 46 72 6f 6d | 3a 20 54 68 65 20 41 6d |son.From|: The Am|
|00000030| 6f 72 70 68 6f 75 73 20 | 4d 61 73 73 20 3c 72 6f |orphous |Mass <ro|
|00000040| 62 69 6e 73 6f 6e 40 62 | 6c 75 65 2e 77 65 65 67 |binson@b|lue.weeg|
|00000050| 2e 75 69 6f 77 61 2e 65 | 64 75 3e 0a 4e 65 77 73 |.uiowa.e|du>.News|
|00000060| 67 72 6f 75 70 73 3a 20 | 63 6f 6d 70 2e 6c 61 6e |groups: |comp.lan|
|00000070| 67 2e 63 0a 53 75 62 6a | 65 63 74 3a 20 52 65 3a |g.c.Subj|ect: Re:|
|00000080| 20 49 6e 70 75 74 20 66 | 69 6c 65 6e 61 6d 65 20 | Input f|ilename |
|00000090| 66 6f 72 20 66 6f 70 65 | 6e 28 29 3f 0a 44 61 74 |for fope|n()?.Dat|
|000000a0| 65 3a 20 53 75 6e 2c 20 | 31 37 20 4d 61 72 20 31 |e: Sun, |17 Mar 1|
|000000b0| 39 39 36 20 32 33 3a 30 | 35 3a 33 32 20 2d 30 36 |996 23:0|5:32 -06|
|000000c0| 30 30 0a 4f 72 67 61 6e | 69 7a 61 74 69 6f 6e 3a |00.Organ|ization:|
|000000d0| 20 55 6e 69 76 65 72 73 | 69 74 79 20 6f 66 20 49 | Univers|ity of I|
|000000e0| 6f 77 61 2c 20 49 6f 77 | 61 20 43 69 74 79 2c 20 |owa, Iow|a City, |
|000000f0| 49 41 2c 20 55 53 41 0a | 44 69 73 74 72 69 62 75 |IA, USA.|Distribu|
|00000100| 74 69 6f 6e 3a 20 77 6f | 72 6c 64 0a 4d 65 73 73 |tion: wo|rld.Mess|
|00000110| 61 67 65 2d 49 44 3a 20 | 3c 50 69 6e 65 2e 41 33 |age-ID: |<Pine.A3|
|00000120| 32 2e 33 2e 39 31 2e 39 | 36 30 33 31 37 32 33 30 |2.3.91.9|60317230|
|00000130| 32 30 32 2e 31 39 32 31 | 37 4b 2d 31 30 30 30 30 |202.1921|7K-10000|
|00000140| 30 40 62 6c 61 63 6b 2e | 77 65 65 67 2e 75 69 6f |0@black.|weeg.uio|
|00000150| 77 61 2e 65 64 75 3e 0a | 52 65 66 65 72 65 6e 63 |wa.edu>.|Referenc|
|00000160| 65 73 3a 20 3c 34 69 69 | 6b 6a 75 24 6e 6b 38 40 |es: <4ii|kju$nk8@|
|00000170| 6c 61 6e 74 61 6e 61 2e | 73 69 6e 67 6e 65 74 2e |lantana.|singnet.|
|00000180| 63 6f 6d 2e 73 67 3e 0a | 4e 4e 54 50 2d 50 6f 73 |com.sg>.|NNTP-Pos|
|00000190| 74 69 6e 67 2d 48 6f 73 | 74 3a 20 62 6c 61 63 6b |ting-Hos|t: black|
|000001a0| 2e 77 65 65 67 2e 75 69 | 6f 77 61 2e 65 64 75 0a |.weeg.ui|owa.edu.|
|000001b0| 4d 69 6d 65 2d 56 65 72 | 73 69 6f 6e 3a 20 31 2e |Mime-Ver|sion: 1.|
|000001c0| 30 0a 43 6f 6e 74 65 6e | 74 2d 54 79 70 65 3a 20 |0.Conten|t-Type: |
|000001d0| 54 45 58 54 2f 50 4c 41 | 49 4e 3b 20 63 68 61 72 |TEXT/PLA|IN; char|
|000001e0| 73 65 74 3d 55 53 2d 41 | 53 43 49 49 0a 58 2d 53 |set=US-A|SCII.X-S|
|000001f0| 65 6e 64 65 72 3a 20 72 | 6f 62 69 6e 73 6f 6e 40 |ender: r|obinson@|
|00000200| 62 6c 61 63 6b 2e 77 65 | 65 67 2e 75 69 6f 77 61 |black.we|eg.uiowa|
|00000210| 2e 65 64 75 0a 49 6e 2d | 52 65 70 6c 79 2d 54 6f |.edu.In-|Reply-To|
|00000220| 3a 20 3c 34 69 69 6b 6a | 75 24 6e 6b 38 40 6c 61 |: <4iikj|u$nk8@la|
|00000230| 6e 74 61 6e 61 2e 73 69 | 6e 67 6e 65 74 2e 63 6f |ntana.si|ngnet.co|
|00000240| 6d 2e 73 67 3e 20 0a 0a | 4f 6e 20 4d 6f 6e 2c 20 |m.sg> ..|On Mon, |
|00000250| 31 38 20 4d 61 72 20 31 | 39 39 36 2c 20 58 59 20 |18 Mar 1|996, XY |
|00000260| 58 69 65 20 77 72 6f 74 | 65 3a 0a 0a 3e 20 48 6f |Xie wrot|e:..> Ho|
|00000270| 77 20 64 6f 20 49 20 67 | 65 74 20 74 68 65 20 75 |w do I g|et the u|
|00000280| 73 65 72 20 74 6f 20 69 | 6e 70 75 74 20 66 69 6c |ser to i|nput fil|
|00000290| 65 6e 61 6d 65 20 66 6f | 72 20 66 6f 70 65 6e 28 |ename fo|r fopen(|
|000002a0| 29 20 20 3f 0a 3e 20 0a | 3e 20 20 49 20 74 72 69 |) ?.> .|> I tri|
|000002b0| 65 64 20 61 20 67 65 74 | 73 28 66 69 6c 65 6e 61 |ed a get|s(filena|
|000002c0| 6d 65 29 20 62 65 66 6f | 72 65 20 61 20 66 6f 70 |me) befo|re a fop|
|000002d0| 65 6e 28 66 69 6c 65 6e | 61 6d 65 2c 22 72 22 29 |en(filen|ame,"r")|
|000002e0| 2e 20 49 74 20 77 6f 72 | 6b 65 64 20 66 6f 72 0a |. It wor|ked for.|
|000002f0| 3e 20 66 69 6c 65 73 20 | 69 6e 20 74 68 65 20 63 |> files |in the c|
|00000300| 75 72 72 65 6e 74 20 64 | 69 72 20 28 77 68 65 6e |urrent d|ir (when|
|00000310| 20 74 68 65 20 75 73 65 | 72 20 6f 6e 6c 79 20 68 | the use|r only h|
|00000320| 61 73 20 74 6f 20 65 6e | 74 65 72 20 74 68 65 0a |as to en|ter the.|
|00000330| 3e 20 66 69 6c 65 6e 61 | 6d 65 29 20 2c 20 62 75 |> filena|me) , bu|
|00000340| 74 20 20 69 74 20 64 6f | 65 73 20 6e 6f 74 20 77 |t it do|es not w|
|00000350| 6f 72 6b 20 66 6f 72 20 | 66 69 6c 65 73 20 69 6e |ork for |files in|
|00000360| 20 6f 74 68 65 72 20 64 | 69 72 73 20 28 77 68 65 | other d|irs (whe|
|00000370| 6e 20 74 68 65 0a 3e 20 | 75 73 65 72 20 68 61 73 |n the.> |user has|
|00000380| 20 74 6f 20 65 6e 74 65 | 72 20 73 6f 6d 65 74 68 | to ente|r someth|
|00000390| 69 6e 67 20 6c 69 6b 65 | 20 22 63 3a 5c 5c 77 69 |ing like| "c:\\wi|
|000003a0| 6e 64 6f 77 73 5c 5c 6c | 65 74 74 65 72 2e 74 78 |ndows\\l|etter.tx|
|000003b0| 74 22 29 2e 0a 3e 20 0a | 3e 20 57 68 65 6e 20 49 |t")..> .|> When I|
|000003c0| 20 74 72 69 65 64 20 74 | 6f 20 74 79 70 65 20 74 | tried t|o type t|
|000003d0| 68 65 20 66 69 6c 65 6e | 61 6d 65 20 64 69 72 65 |he filen|ame dire|
|000003e0| 63 74 6c 79 20 69 6e 74 | 6f 20 66 6f 70 65 6e 28 |ctly int|o fopen(|
|000003f0| 29 2c 20 69 74 20 77 6f | 72 6b 65 64 0a 3e 20 66 |), it wo|rked.> f|
|00000400| 69 6e 65 20 66 6f 72 20 | 61 6e 79 20 66 69 6c 65 |ine for |any file|
|00000410| 20 61 6e 79 20 77 68 65 | 72 65 2e 0a 3e 20 53 6f | any whe|re..> So|
|00000420| 20 49 20 67 75 65 73 73 | 20 74 68 65 20 70 72 6f | I guess| the pro|
|00000430| 62 6c 65 6d 20 6c 69 65 | 73 20 69 6e 20 74 68 65 |blem lie|s in the|
|00000440| 20 27 20 5c 20 27 20 20 | 62 65 63 61 75 73 65 20 | ' \ ' |because |
|00000450| 43 20 74 72 65 61 74 73 | 20 69 74 20 61 73 20 61 |C treats| it as a|
|00000460| 6e 0a 3e 20 65 73 63 61 | 70 65 20 73 65 71 75 65 |n.> esca|pe seque|
|00000470| 6e 63 65 2e 20 48 6f 77 | 20 64 6f 20 49 20 67 65 |nce. How| do I ge|
|00000480| 74 20 61 72 6f 75 6e 64 | 20 74 68 69 73 3f 0a 0a |t around| this?..|
|00000490| 20 20 48 61 76 65 20 74 | 68 65 20 75 73 65 72 20 | Have t|he user |
|000004a0| 65 6e 74 65 72 20 66 6f | 72 77 61 72 64 20 73 6c |enter fo|rward sl|
|000004b0| 61 73 68 65 73 20 61 6e | 64 20 74 68 65 6e 20 6c |ashes an|d then l|
|000004c0| 6f 6f 70 20 74 68 72 6f | 75 67 68 20 61 6e 64 20 |oop thro|ugh and |
|000004d0| 63 6f 6e 76 65 72 74 20 | 0a 65 76 65 72 79 20 22 |convert |.every "|
|000004e0| 2f 22 20 74 6f 20 22 5c | 5c 22 2e 20 2a 73 68 72 |/" to "\|\". *shr|
|000004f0| 75 67 2a 0a 0a 20 20 42 | 54 57 20 69 74 27 73 20 |ug*.. B|TW it's |
|00000500| 62 65 74 74 65 72 20 74 | 6f 20 75 73 65 20 66 67 |better t|o use fg|
|00000510| 65 74 73 28 29 20 74 68 | 61 6e 20 67 65 74 73 28 |ets() th|an gets(|
|00000520| 29 20 62 65 63 61 75 73 | 65 20 66 67 65 74 73 28 |) becaus|e fgets(|
|00000530| 29 20 73 65 74 73 20 61 | 20 0a 6d 61 78 69 6d 75 |) sets a| .maximu|
|00000540| 6d 20 6e 75 6d 62 65 72 | 20 6f 66 20 63 68 61 72 |m number| of char|
|00000550| 61 63 74 65 72 73 20 74 | 6f 20 72 65 61 64 20 69 |acters t|o read i|
|00000560| 6e 2c 20 73 6f 20 74 68 | 61 74 20 79 6f 75 20 64 |n, so th|at you d|
|00000570| 6f 6e 27 74 20 77 72 69 | 74 65 20 70 61 73 74 20 |on't wri|te past |
|00000580| 74 68 65 20 0a 62 6f 75 | 6e 64 73 20 6f 66 20 66 |the .bou|nds of f|
|00000590| 69 6c 65 6e 61 6d 65 2e | 0a 0a 2f 2a 2a 4a 61 6d |ilename.|../**Jam|
|000005a0| 65 73 20 52 6f 62 69 6e | 73 6f 6e 2a 2a 2a 2a 2a |es Robin|son*****|
|000005b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000005c0| 2a 2a 20 20 20 20 20 20 | 20 20 20 20 20 20 0a 20 |** | . |
|000005d0| 20 22 49 66 20 61 20 66 | 61 74 61 6c 20 65 72 72 | "If a f|atal err|
|000005e0| 6f 72 20 6f 63 63 75 72 | 73 2c 20 74 68 65 20 70 |or occur|s, the p|
|000005f0| 72 6f 67 72 61 6d 20 73 | 68 6f 75 6c 64 20 6e 6f |rogram s|hould no|
|00000600| 74 20 62 65 20 61 6c 6c | 6f 77 65 64 20 74 6f 20 |t be all|owed to |
|00000610| 63 6f 6e 74 69 6e 75 65 | 2e 22 0a 20 2d 2d 20 4f |continue|.". -- O|
|00000620| 72 61 63 6c 65 20 50 72 | 6f 2a 43 20 55 73 65 72 |racle Pr|o*C User|
|00000630| 27 73 20 47 75 69 64 65 | 20 20 20 20 20 20 20 20 |'s Guide| |
|00000640| 20 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 6a 61 | *******|******ja|
|00000650| 6d 65 73 2d 72 6f 62 69 | 6e 73 6f 6e 40 75 69 6f |mes-robi|nson@uio|
|00000660| 77 61 2e 65 64 75 2a 2a | 2f 0a |wa.edu**|/. |
+--------+-------------------------+-------------------------+--------+--------+